package Book;

public class BookList{

    private int usedSize;//当前书架上实际存放书的数量
    private Book[] books;
    private static final int DEFAULT_CAPACITY = 10;

    public BookList() {
        this.books = new Book[DEFAULT_CAPACITY];
        this.usedSize = 0;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBook(int pos,Book book) {
        books[pos] = book;
    }

    public Book getBook(int pos) {
        return books[pos];
    }
}
